set(GTEST_DIR "D:/Workspace/RuntimeProjects/googletest")
# 定义一个宏来查找 gtest
macro(find_gtest)
    find_package(GTest REQUIRED CONFIG PATHS ${GTEST_DIR} NO_DEFAULT_PATH)
    if (GTEST_FOUND)
        set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIRS} ${GTEST_MAIN_INCLUDE_DIR})
        set(GTEST_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
        message(${GTEST_INCLUDE_DIRS})
    else ()
        message(FATAL_ERROR "Google Test not found")
    endif ()
endmacro()
